package com.web.cms.doc.message;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;

import javax.validation.constraints.NotBlank;

import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;

public class DocCommentRequest implements Serializable
{
	private static final long serialVersionUID = 1L;

	@NotNull(groups = { UpdateModel.class }, message = "文档评论ID不能为空")
	@Null(groups = { SaveModel.class }, message = "文档评论ID必须为空")
	private Long id;
	@NotNull(groups = { SaveModel.class }, message = "文档ID不能为空")
	private Integer docId;
	@NotNull(groups = { SaveModel.class }, message = "用户ID不能为空")
	private Integer userId;
	@NotBlank(groups = { SaveModel.class }, message = "评论者不能为空")
	@Size(min = 0, max = 20, groups = { SaveModel.class, UpdateModel.class }, message = "评论者长度[0-20]")
	private String author;
	@NotBlank(groups = { SaveModel.class, UpdateModel.class }, message = "评论内容不能为空")
	@Size(min = 0, max = 500, groups = { SaveModel.class, UpdateModel.class }, message = "评论内容长度[0-500]")
	private String content;
	private Date createTime;

	public DocCommentRequest()
	{
	}

	public Long getId()
	{
		return id;
	}

	public void setId(Long id)
	{
		this.id = id;
	}

	public Integer getDocId()
	{
		return docId;
	}

	public void setDocId(Integer docId)
	{
		this.docId = docId;
	}

	public Integer getUserId()
	{
		return userId;
	}

	public void setUserId(Integer userId)
	{
		this.userId = userId;
	}

	public String getAuthor()
	{
		return author;
	}

	public void setAuthor(String author)
	{
		this.author = author;
	}

	public String getContent()
	{
		return content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

}
